summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/project.cpp68
-rw-r--r--common/typedefs.h2
-rw-r--r--docs/CHANGES.txt7
-rw-r--r--linux/menu.cpp5
4 files changed, 80 insertions, 2 deletions
diff --git a/common/project.cpp b/common/project.cpp
index f159dac..29ec323 100644
--- a/common/project.cpp
+++ b/common/project.cpp
@@ -5183,6 +5183,9 @@ void Project::HandleCommand(LC_COMMANDS id, unsigned long nParam)
{
redraw = true;
pPiece->SetFrameShow(t+1);
+
+ if (pPiece->IsSelected () && t == m_nCurFrame)
+ pPiece->Select (false, false, false);
}
}
else
@@ -5190,8 +5193,11 @@ void Project::HandleCommand(LC_COMMANDS id, unsigned long nParam)
unsigned char t = pPiece->GetStepShow();
if (t < 255)
{
- redraw = true;
- pPiece->SetStepShow(t+1);
+ redraw = true;
+ pPiece->SetStepShow(t+1);
+
+ if (pPiece->IsSelected () && t == m_nCurStep)
+ pPiece->Select (false, false, false);
}
}
}
@@ -5201,6 +5207,7 @@ void Project::HandleCommand(LC_COMMANDS id, unsigned long nParam)
SetModifiedFlag(true);
CheckPoint("Modifying");
SystemRedrawView();
+ UpdateSelection ();
}
} break;
@@ -5516,6 +5523,63 @@ void Project::HandleCommand(LC_COMMANDS id, unsigned long nParam)
SystemUpdateTime(m_bAnimation, m_nCurStep, 255);
} break;
+ case LC_VIEW_STEP_INSERT:
+ {
+ bool redraw = false;
+
+ if (m_bAnimation)
+ break;
+
+ for (Piece* pPiece = m_pPieces; pPiece; pPiece = pPiece->m_pNext)
+ {
+ unsigned char t = pPiece->GetStepShow();
+
+ if (t >= m_nCurStep && t < 255)
+ {
+ redraw = true;
+ pPiece->SetStepShow (t+1);
+
+ if (pPiece->IsSelected () && t == m_nCurStep)
+ pPiece->Select (false, false, false);
+ }
+ }
+
+ if (redraw)
+ {
+ SetModifiedFlag (true);
+ CheckPoint ("Adding Step");
+ SystemRedrawView ();
+ UpdateSelection ();
+ }
+ } break;
+
+ case LC_VIEW_STEP_DELETE:
+ {
+ bool redraw = false;
+
+ if (m_bAnimation)
+ break;
+
+ for (Piece* pPiece = m_pPieces; pPiece; pPiece = pPiece->m_pNext)
+ {
+ unsigned char t = pPiece->GetStepShow();
+
+ if (t >= m_nCurStep && t > 1)
+ {
+ redraw = true;
+ pPiece->SetStepShow (t-1);
+ }
+ }
+
+ if (redraw)
+ {
+ SetModifiedFlag (true);
+ CheckPoint ("Removing Step");
+ SystemRedrawView ();
+ UpdateSelection ();
+ }
+ } break;
+
case LC_VIEW_STOP:
{
m_bStopRender = true;
diff --git a/common/typedefs.h b/common/typedefs.h
index 502ba49..96772ed 100644
--- a/common/typedefs.h
+++ b/common/typedefs.h
@@ -69,6 +69,8 @@ typedef enum {
LC_VIEW_STEP_LAST,
LC_VIEW_STEP_CHOOSE,
LC_VIEW_STEP_SET,
+ LC_VIEW_STEP_INSERT,
+ LC_VIEW_STEP_DELETE,
LC_VIEW_STOP,
LC_VIEW_PLAY,
LC_VIEW_CAMERA_MENU,
diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt
index 310767b..4ead0aa 100644
--- a/docs/CHANGES.txt
+++ b/docs/CHANGES.txt
@@ -1,5 +1,12 @@
This is a changelog for developers only, not for ordinary users.
+30/12/2000
+ - Added Step Insert and Step Delete commands.
+
+29/12/2000
+ - Capture mouse events while dragging the cursor under linux.
+ - HTML Dialog improvements under linux.
+
28/12/2000
- Click on "Last Step" goes to the last used step instead of step 255.
- Save HTML dialog options.
diff --git a/linux/menu.cpp b/linux/menu.cpp
index cbed788..4d1ea47 100644
--- a/linux/menu.cpp
+++ b/linux/menu.cpp
@@ -229,6 +229,11 @@ void create_main_menu (GtkObject *window, GtkWidget *vbox)
window, LC_VIEW_STEP_NEXT, "menu_view_step_next");
create_menu_item (menu_in_menu, "_Last", menu_accel, GTK_SIGNAL_FUNC (OnCommandDirect),
window, LC_VIEW_STEP_LAST, "menu_view_step_last");
+ menu_separator (menu_in_menu);
+ create_menu_item (menu_in_menu, "_Insert", menu_accel, GTK_SIGNAL_FUNC (OnCommandDirect),
+ window, LC_VIEW_STEP_INSERT, "menu_view_step_insert");
+ create_menu_item (menu_in_menu, "_Delete", menu_accel, GTK_SIGNAL_FUNC (OnCommandDirect),
+ window, LC_VIEW_STEP_DELETE, "menu_view_step_delete");
menu = create_sub_menu (menu_bar, "_Help", accel, &menu_accel);
menu_tearoff (menu);