View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0016194||Scribus||Internal||public||2020-07-28 17:45||2020-07-28 18:34|
|Summary||0016194: On refactoring CanvasMode::commonkeyPressEvent_NormalNodeEdit()|
|Description||CanvasMode::commonkeyPressEvent_NormalNodeEdit() is a 700 lines of code "monster" function.|
on top of it, some of the features are duplicated into ScribusMainWindow::keyPressEvent().
the refactoring has produced code that:
- is (imo) easier to read
- can be reused in different place
- is shorter (100 LOC + 300 LOC in an helper class + 70 LOC in canvasmode_nodeedit)
- has max 3 levels (but normally only 1!) level of indenting (the original code can have more than 10 levels...)
the code is not ready to be shared yet, but i would be glad, if somebody could review it during the next few days.
|Tags||No tags attached.|