undo functioning in GUI in MATLAB .

5 ビュー (過去 30 日間)
yogesh jain
yogesh jain 2015 年 9 月 30 日
コメント済み: Walter Roberson 2015 年 10 月 1 日
hello all , Working on image processing with using GUIDE , want to know that how to add "UNDO & REDO" buttons in GUI ?
Thanks in advance :)

採用された回答

Walter Roberson
Walter Roberson 2015 年 9 月 30 日
編集済み: Walter Roberson 2015 年 9 月 30 日
For each change, you have to keep a record of the original state and the new state. Undo involves changing the current state to the original state and internally marking that you are now one further back in the chain. Redo involves changing the current state to the remembered state and internally marking that you are now one further along in the chain.
You need to decide what you want to happen if someone does something, undoes it, and then does something different. It is common that at that point the rest of the "redo" chain would be wiped out, but that is not the only possibility.
There is no MATLAB function to implement this for you. Changing current state can be a lot of work. For example if you triggered a call that did half an hour of calculations and changed 5 gigabytes of database, then undoing that work can be messy.
If you find that re-doing an action involves writing code that moves cursors and pressed buttons on the user's behalf, then chances are you need to re-think your design.
  6 件のコメント
yogesh jain
yogesh jain 2015 年 10 月 1 日
@Image analyst - thank you sir but could u suggest me some functions and steps for doing that process ?
@Walter Roberson - Thanks to you too .
Walter Roberson
Walter Roberson 2015 年 10 月 1 日
Function to save copies of variables: save()

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by