git-svn-id: svn://db.shs.com.ru/libs@100 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -119,6 +119,8 @@ void HistoryView::clear(bool silent) {
|
|||||||
QListWidget::clear();
|
QListWidget::clear();
|
||||||
if (!silent) addEntry(-1);
|
if (!silent) addEntry(-1);
|
||||||
emit clearAvailable(false);
|
emit clearAvailable(false);
|
||||||
|
emit redoAvailable(index < count());
|
||||||
|
emit undoAvailable((index > 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -131,7 +133,7 @@ void HistoryView::undo() {
|
|||||||
|
|
||||||
|
|
||||||
void HistoryView::redo() {
|
void HistoryView::redo() {
|
||||||
if (index > count()) return;
|
if (index >= count()) return;
|
||||||
index++;
|
index++;
|
||||||
emit commandExecute(history_[index - 1].command);
|
emit commandExecute(history_[index - 1].command);
|
||||||
itemSelectionChanged();
|
itemSelectionChanged();
|
||||||
|
|||||||
Reference in New Issue
Block a user