Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Guetzkow <rjg>2019-04-02 17:39:48 +0300
committerJacques Lucke <mail@jlucke.com>2019-04-02 17:39:48 +0300
commitf54db0fa057e036645f0e635ca849cfb61320ded (patch)
tree5108605d51725c7ef513f416538a387dfa51c051 /source/blender/editors/space_node/node_edit.c
parent459daf16487485533ca9cdfb347fc8767fbf887a (diff)
UI: Collapsed nodes have the same width as uncollapsed nodes
Fixes T63079. Differential Revision: https://developer.blender.org/D4617
Diffstat (limited to 'source/blender/editors/space_node/node_edit.c')
-rw-r--r--source/blender/editors/space_node/node_edit.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 006554f230e..a6aaca88e62 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -837,7 +837,6 @@ typedef struct NodeSizeWidget {
float oldlocx, oldlocy;
float oldoffsetx, oldoffsety;
float oldwidth, oldheight;
- float oldminiwidth;
int directions;
} NodeSizeWidget;
@@ -858,7 +857,6 @@ static void node_resize_init(bContext *C, wmOperator *op, const wmEvent *UNUSED(
nsw->oldoffsety = node->offsety;
nsw->oldwidth = node->width;
nsw->oldheight = node->height;
- nsw->oldminiwidth = node->miniwidth;
nsw->directions = dir;
WM_cursor_modal_set(CTX_wm_window(C), node_get_resize_cursor(dir));
@@ -890,21 +888,12 @@ static int node_resize_modal(bContext *C, wmOperator *op, const wmEvent *event)
dy = (my - nsw->mystart) / UI_DPI_FAC;
if (node) {
- /* width can use node->width or node->miniwidth (hidden nodes) */
float *pwidth;
float oldwidth, widthmin, widthmax;
- /* ignore hidden flag for frame nodes */
- bool use_hidden = (node->type != NODE_FRAME);
- if (use_hidden && node->flag & NODE_HIDDEN) {
- pwidth = &node->miniwidth;
- oldwidth = nsw->oldminiwidth;
- widthmin = 0.0f;
- }
- else {
- pwidth = &node->width;
- oldwidth = nsw->oldwidth;
- widthmin = node->typeinfo->minwidth;
- }
+
+ pwidth = &node->width;
+ oldwidth = nsw->oldwidth;
+ widthmin = node->typeinfo->minwidth;
widthmax = node->typeinfo->maxwidth;
{